package com.lx.idgenerator.model;


/**
 * 异常码
 */
public enum StateCode {


    SUCCESS(200, "请求成功"),
    CONSTRAINT_VIOLATION(502, "方法参数校验出错"),

    METHOD_ARGUMENT_NOT_VALID(501, "方法参数无效"),

    ERROR(500, "服务器异常"),
    REDIS_OPERATION_FAIL(500, "Redis操作失败");


    private int code;
    private String msg;

    public String msg() {
        return msg;
    }

    public int code() {
        return code;
    }

    StateCode(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }


}
